<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">MINBALL</b>
<td valign="baseline" align="right" class="function"><a href="../kernels/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>Minimal enclosing ball in kernel feature space. </b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;minball(X)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;minball(X,options)</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;computes&nbsp;center&nbsp;and&nbsp;radius&nbsp;of&nbsp;the&nbsp;minimal&nbsp;ball</span><br>
<span class=help>&nbsp;&nbsp;enclosing&nbsp;data&nbsp;X&nbsp;mapped&nbsp;into&nbsp;a&nbsp;feature&nbsp;space&nbsp;induced&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;by&nbsp;a&nbsp;given&nbsp;kernel.&nbsp;The&nbsp;problem&nbsp;leads&nbsp;to&nbsp;a&nbsp;special&nbsp;instance&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;of&nbsp;the&nbsp;Quadratic&nbsp;Programming&nbsp;task&nbsp;which&nbsp;is&nbsp;solved&nbsp;by&nbsp;the&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;GMNP&nbsp;solver&nbsp;(see&nbsp;'help&nbsp;gmnp').</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Input&nbsp;data.</span><br>
<span class=help>&nbsp;&nbsp;options&nbsp;[struct]&nbsp;Control&nbsp;parameters:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.ker&nbsp;[string]&nbsp;Kernel&nbsp;identifier&nbsp;(default&nbsp;'linear').&nbsp;See&nbsp;'help&nbsp;kernel'.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.arg&nbsp;[1&nbsp;x&nbsp;nargs]&nbsp;Kernel&nbsp;arguments.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.solver&nbsp;[string]&nbsp;Solver&nbsp;to&nbsp;be&nbsp;used&nbsp;(see&nbsp;'help&nbsp;gmnp');&nbsp;default&nbsp;'imdm';</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.C&nbsp;[1x1]&nbsp;Regularization&nbsp;constant&nbsp;(default&nbsp;[]);&nbsp;If&nbsp;C&nbsp;&gt;&nbsp;0&nbsp;it&nbsp;is&nbsp;equivalent&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;the&nbsp;Support&nbsp;Vector&nbsp;Data&nbsp;Description&nbsp;(or&nbsp;1-class&nbsp;SVM)&nbsp;by&nbsp;Tax-Duin&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with&nbsp;quadratric&nbsp;penalization&nbsp;of&nbsp;overlapping&nbsp;data.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Center&nbsp;of&nbsp;the&nbsp;ball&nbsp;in&nbsp;the&nbsp;kernel&nbsp;feature&nbsp;space:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.sv.X&nbsp;[dim&nbsp;x&nbsp;nsv]&nbsp;Data&nbsp;determining&nbsp;the&nbsp;center.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Alpha&nbsp;[nsv&nbsp;x&nbsp;1]&nbsp;Data&nbsp;weights.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.r&nbsp;[1x1]&nbsp;Radius&nbsp;of&nbsp;the&nbsp;minimal&nbsp;enclosing&nbsp;ball.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.b&nbsp;[1x1]&nbsp;Squared&nbsp;norm&nbsp;of&nbsp;the&nbsp;center&nbsp;equal&nbsp;to&nbsp;Alpha'*K*Alpha.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.options&nbsp;[struct]&nbsp;Copy&nbsp;of&nbsp;used&nbsp;options.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.stat&nbsp;[struct]&nbsp;Statistics&nbsp;about&nbsp;optimization:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.access&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;requested&nbsp;columns&nbsp;of&nbsp;matrix&nbsp;H.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.t&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;iterations.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.UB&nbsp;[1x1]&nbsp;Upper&nbsp;bound&nbsp;on&nbsp;the&nbsp;optimal&nbsp;value&nbsp;of&nbsp;criterion.&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.LB&nbsp;[1x1]&nbsp;Lower&nbsp;bound&nbsp;on&nbsp;the&nbsp;optimal&nbsp;value&nbsp;of&nbsp;criterion.&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.LB_History&nbsp;[1x(t+1)]&nbsp;LB&nbsp;with&nbsp;respect&nbsp;to&nbsp;iteration.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.UB_History&nbsp;[1x(t+1)]&nbsp;UB&nbsp;with&nbsp;respect&nbsp;to&nbsp;iteration.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.NA&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;non-zero&nbsp;entries&nbsp;in&nbsp;solution.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;data&nbsp;=&nbsp;load('riply_trn');</span><br>
<span class=help>&nbsp;&nbsp;options&nbsp;=&nbsp;struct('ker','rbf','arg',1);</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;minball(data.X,options);</span><br>
<span class=help>&nbsp;&nbsp;[Ax,Ay]&nbsp;=&nbsp;meshgrid(linspace(-5,5,100),linspace(-5,5,100));</span><br>
<span class=help>&nbsp;&nbsp;dist&nbsp;=&nbsp;kdist([Ax(:)';Ay(:)'],model);</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;hold&nbsp;on;&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;ppatterns(data.X);&nbsp;ppatterns(model.sv.X,'ro',12);</span><br>
<span class=help>&nbsp;&nbsp;contour(&nbsp;Ax,&nbsp;Ay,&nbsp;reshape(dist,100,100),[model.r&nbsp;model.r]);</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;<a href = "../kernels/kdist.html" target="mdsbody">KDIST</a>.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../kernels/list/minball.html">minball.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2005, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 24-july-2008, VF: fixed problem with computing r; pointed out by Daewon Lee (MPI, Tuebingen)<br>
 09-nov-2006, VF, added C; requested by Hsiung, Chang<br>
 24-jan-2005, VF, Fast GMNP solver used.<br>
 25-aug-2004, VF, added model.fun = 'kdist' and .diag_add changed to .mu <br>
 16-may-2004, VF<br>
 15-jun-2002, VF<br>

</body>
</html>
